<script src="${rc.getContextPath()}/manage/js/dwzCustomJs/dwz.custom.advancedquery.js?v=${ver}" type="text/javascript"></script>
<link href="${rc.getContextPath()}/manage/css/dwzCustomCss/dwz.custom.css?v=${ver}" rel="stylesheet" type="text/css">
<#include "/common/pagerForm.html">
<form rel="pagerForm" method="post" action="" class="required-validate" onsubmit="return navTabSearch(this)">
<input type="hidden" id="advancedStatus" name="advancedStatus" value="${condition.advancedStatus!''}" />
<div class="pageHeader">
    <div class="searchBar">
        <ul class="searchContent">
            <li >
            	<label><@label key='operationTaskNum.C,colon'>工序任务单编号：</@label></label> 
            	<input type="text" name="operationTaskNum" value="${condition.operationTaskNum!''}"/>
            </li>
            <li >
            	<label><@label key="operationCode.C,colon">工序编号：</@label></label> 
            	<input type="text" class="textInput" name="operationCode" value="${condition.operationCode!''}" />
            </li>
            <li >
            	<label><@label key='operationTaskstatus.C,colon'>工序任务单状态：</@label></label> 
                <select name="statusECode">
                    <option value="" ><@label key='all.C'>所有</@label></option>
                    <#if operationTaskStatus??>
                        <#list operationTaskStatus as ecode>
                            <option value="${ecode.eCode!''}" <#if condition.statusECode?? && condition.statusECode == ecode.eCode> selected</#if> >${ecode.eCodeText!''}</option>
                        </#list>
                    </#if>
                </select>
            </li>    
            <li class="query">
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit"><@label key="query.B">查询</@label></button>
                    </div>
                </div>
            </li>
        </ul>
        <ul class="searchContent">
            <li>
            	<label><@label key='productionControlNum.C,colon'>生产管理号：</@label></label>
            	<input type="text" name="productionControlNum" value="${condition.productionControlNum!''}" />
            </li>
			<li>
				<label><@label key='plannedWorkUnitCode.C,colon'>计划作业单元：</@label></label> 
				<input type="text" name="plannedWorkUnitCode" value="${condition.plannedWorkUnitCode!''}" />
			</li>			
			<li>
				<label><@label key="personnelCode.C,colon">人员编号：</@label></label> 
				<input class="look" id="personnelLookup.personnelCode" name="lastPersonnelCode" type="text" postField="personnelCode" suggestFields="personnelCode,personnelName" value="${condition.lastPersonnelCode!''}"
					suggestUrl="${rc.getContextPath()}/manage/personnel/personnelSuggest" lookupGroup="personnelLookup" remote="${rc.getContextPath()}/manage/personnel/validatePersonnel" />
				<a class="btnLook" href="${rc.getContextPath()}/manage/personnel/personnelLookUp?lookupType=radio" rel="personnel_dialog"  title="<@label key='select.C,personnelCode.C'>选择人员 </@label>" lookupGroup="personnelLookup" ></a>
			</li>
		</ul>
		<ul class="searchContent">
            <li>
            	<label><@label key='productionOrderNum.C,colon'>生产订单编号：</@label></label> 
            	<input type="text" name="productionOrderNum" value="${condition.productionOrderNum!''}"/>
            </li>
        	<li>
        		<label><@label key='orderType.C,colon'>订单类型：</@label></label> 
                <select name="orderTypeCode">
                    <option value="" ><@label key='all.C'>所有</@label></option>
                    <#if orderTypes??>
                        <#list orderTypes as orderType>
                            <option value="${orderType.orderTypeCode!''}" <#if condition.orderTypeCode?? && condition.orderTypeCode == orderType.orderTypeCode> selected</#if> >${orderType.orderTypeText!''}</option>
                        </#list>
                    </#if>
                </select>
            </li>
        </ul>
    </div>
</div>
</form>

<div class="pageContent">

    <div class="panelBar">
        <ul class="toolBar">
            <@buttonRight menuCode="VIEWOPERATIONTASK" labelKey="view.B" defalutName="详情">
	           <li><a class="icon" target="dialog" mask="true" width="880" height="550" rel="order_tab"
	           href="${rc.getContextPath()}/manage/operationTask/viewOperationTask?operationTaskNum={operationTask_Num}&navTabId=${navTabId!''}"><span><@label key="view.B">详情</@label></span></a>
	           </li>
            </@buttonRight>
            
            <@buttonRight menuCode="RELEASEOPERATIONTASK" labelKey="issued.B" defalutName="下达">
	            	            
	            <li><a class="rel" target="selectedTodo" 
	            href="${rc.getContextPath()}/manage/operationTask/releaseOperationTask?navTabId=${navTabId!''}" 
	            postType="string" rel="operationTaskNums" callback="batchjobAjaxDone"
                title="<@label key='forceReleaseOperationTask.M'>确认下达选择的工序任务单？</@label>">
                <span><@label key="issued.B">下达</@label></span>
                </a>
            	</li>
            </@buttonRight>
            
           
			<@buttonRight menuCode="REVOCATIONOPERATIONTASK" labelKey="backissued.B" defalutName="撤回下达">
	            
	            <li><a class="unRel" target="selectedTodo" 
	            href="${rc.getContextPath()}/manage/operationTask/revocationOperationTask?navTabId=${navTabId!''}" 
	            postType="string" rel="operationTaskNums" callback="batchjobAjaxDone"
                title="<@label key='forceRevocaOperationTask.M'>确认撤销选择工序任务单？</@label>">
                <span><@label key="backissued.B">撤回下达</@label></span></span>
                </a>
            	</li>
            </@buttonRight>
            
			<@buttonRight menuCode="OPERATIONTASK_CLOSE" labelKey="forceClose.B" defalutName="强制关闭">	           
	            <li><a class="delete" target="selectedTodo" 
	            href="${rc.getContextPath()}/manage/operationTask/closeOperationTask?navTabId=${navTabId!''}" 
	            postType="string" rel="operationTaskNums" callback="batchjobAjaxDone"
                title="<@label key='forceCloseOperationTask.M'>确认强制关闭工序任务单？</@label>"><span><@label key="forceClose.B">强制关闭</@label></span>
                </a>
            	</li>
            </@buttonRight>
        </ul>
    </div>
    
    <table class="table" width="120%" layoutH="190">
        <thead>
            <tr>
                <th width="20"><@label key="serialNumber.C">序号</@label></th>
                <th width="20"><input type="checkbox" group="operationTaskNums" class="checkboxCtrl"></th>
                <th width="60" orderField="operationTaskNum"<#if (page.orderField?? && page.orderField == 'operationTaskNum')>class="${page.orderDirection!''}"</#if>><@label key='operationTaskNum.C'>工序任务单</@label></th>
                <th width="60" orderField="productionControlNum"<#if (page.orderField?? && page.orderField == 'productionControlNum')>class="${page.orderDirection!''}"</#if>><@label key='productionControlNum.C'>生产管理号</@label></th>
                <th width="60" orderField="productionOrderNum"<#if (page.orderField?? && page.orderField == 'productionOrderNum')>class="${page.orderDirection!''}"</#if>><@label key='productionOrderNum.C'>生产订单编号</@label></th>
                <th width="80" orderField="materialCode"<#if (page.orderField?? && page.orderField == 'materialCode')>class="${page.orderDirection!''}"</#if>><@label key='materialCode.C'>物料编号</@label></th>
                <th width="80" orderField="materialText"<#if (page.orderField?? && page.orderField == 'materialText')>class="${page.orderDirection!''}"</#if>><@label key='materialText.C'>物料名称</@label></th>
                <th width="50" orderField="statusECode"<#if (page.orderField?? && page.orderField == 'statusECode')>class="${page.orderDirection!''}"</#if>><@label key='operationTaskstatus.C'>工序任务单状态</@label></th>                
                <th width="80" orderField="plannedWorkUnitCode"<#if (page.orderField?? && page.orderField == 'plannedWorkUnitCode')>class="${page.orderDirection!''}"</#if>><@label key='plannedWorkUnitCode.C'>计划作业单元</@label></th>
                <th width="80" orderField="plannedWorkUnitText"<#if (page.orderField?? && page.orderField == 'plannedWorkUnitText')>class="${page.orderDirection!''}"</#if>><@label key='plannedWorkUnitText.C'>计划作业单元描述</@label></th>                
                <th width="50" orderField="lastPersonnelCode"<#if (page.orderField?? && page.orderField == 'lastPersonnelCode')>class="${page.orderDirection!''}"</#if>><@label key='lastPersonnelCode.C'>最近报工职员</@label></th>                
                <th width="50" orderField="plannedQuantity"<#if (page.orderField?? && page.orderField == 'plannedQuantity')>class="${page.orderDirection!''}"</#if>><@label key='plannedQuantity.C'>计划数量</@label></th>
                <th width="50" orderField="completedQuantity"<#if (page.orderField?? && page.orderField == 'completedQuantity')>class="${page.orderDirection!''}"</#if>><@label key='completedQuantity.C'>完工数量</@label></th>           
            </tr>
        </thead>
        <tbody>
        <#if page??><#if (page.data?size>0)> <#list page.data as operationTask>
            <tr target="operationTask_Num" rel="${operationTask.operationTaskNum!''}">
                <td>${page.startRow + operationTask_index}</td>
                <td><input name="operationTaskNums" value="${operationTask.operationTaskNum!''}" type="checkbox"></td>
                <td>${operationTask.operationTaskNum!''}</td>
                <td>${operationTask.productionControlNum!''}</td>                
                <td>${operationTask.productionOrderNum!''}</td>
                <td>${operationTask.materialCode!''}</td>
                <td>${operationTask.materialText!''}</td>
                <td><#if operationTaskStatus??>
                    <#list operationTaskStatus as ecode>
                        <#if operationTask.statusECode == ecode.eCode>${ecode.eCodeText!''}<#break></#if>
                    </#list>
                </#if>
                </td>
                <td>${operationTask.plannedWorkUnitCode!''}</td>
                <td>${operationTask.plannedWorkUnitText!''}</td>
                <td>${operationTask.lastPersonnelCode!''}</td>
                <td>${operationTask.plannedQuantity!''}</td>
                <td>${operationTask.completedQuantity!''}</td>   
            </tr>
        </#list>
        <#else>
        <tr target="product_id">
                <td colspan="20" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        <#else>
        <tr target="product_id">
                <td colspan="20" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        </tbody>
    </table>
    <#include "/common/panelBar.html">
</div>
